# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfce4-screenshooter
pkgver=1.10.5
pkgrel=0
pkgdesc="Screenshot application for Xfce4"
url="https://goodies.xfce.org/projects/applications/xfce4-screenshooter"
arch="all"
license="GPL-2.0-or-later"
subpackages="$pkgname-doc $pkgname-lang $pkgname-imgur"
makedepends="
	exo-dev
	hicolor-icon-theme
	libsoup3-dev
	libxext-dev
	libxfce4ui-dev
	xfce4-panel-dev
	"
source="https://archive.xfce.org/src/apps/xfce4-screenshooter/${pkgver%.*}/xfce4-screenshooter-$pkgver.tar.bz2"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib \
		--localstatedir=/var \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

imgur() {
	pkgdesc="$pkgdesc (imgur uploader script)"
	depends="$pkgname=$pkgver-r$pkgrel curl jq xclip zenity"

	amove usr/lib/xfce4/screenshooter/scripts/imgur-upload.sh
}

sha512sums="
0040b28514ffc77473b2d9f182c1bc162f8ac21aac97f2e28eb2b5556255dd74f7d4545f049b4060a8db6c0d415831fe5988da581857f22894bed01136aee677  xfce4-screenshooter-1.10.5.tar.bz2
"
